package com.example.design.ticket.builder;

import com.example.design.ticket.product.PersonalTicket;


// 建造者模式个人电子发票票建造者
public class PersonalTicketBuilder extends TicketBuilder<PersonalTicket> {

    //创建一个新的 PersonalTicket 对象
    private PersonalTicket personalTicket = new PersonalTicket();


    //对于PersonalTicket，我们只需要setCommonInfo
    @Override
    public void setCommonInfo(String title, String product, String content) {
        personalTicket.setContent(content);
        personalTicket.setTitle(title);
        personalTicket.setProduct(product);
    }

    // 构建个人电子发票票
    @Override
    public PersonalTicket buildTicket() {
        return personalTicket;
    }


}
